<html><head><title>AddSysTrayIcon</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">AddSysTrayIcon()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>AddSysTrayIcon</b></font>(#SysTrayIcon, WindowID, ImageID)</blockquote>

<b>Description</b><br><blockquote>

Adds an icon in the SysTray area. 
<br>
<br>
When an event occurs on any of the SysTray icons the <font color="#924B72">#PB_Event_SysTray</font> event is 
sent. <a href="../window/eventgadget.html">EventGadget()</a> can be used to know which SysTrayIcon has been 
used. <a href="../window/eventtype.html">EventType()</a> functions is also updated by this function. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#SysTrayIcon</i></td>
<td width="90%"> 
A number to identify the new systray icon. 
<a href="../reference/purebasic_objects.html">#PB_Any</a> can be used to auto-generate this number. 

</td></tr>
<tr><td><i>WindowID</i></td>
<td> 
The window on which will handle the systray events. <a href="../window/windowid.html">WindowID()</a> can be used to get this value. 

</td></tr>
<tr><td><i>ImageID</i></td>
<td> 
The image to use for the systray icon. Only icon image type (.ico) are supported on Windows, for Linux and OS X it is advised to use a PNG image 
(in order to have a transparency layer). <a href="../image/imageid.html">ImageID()</a> may be used to get this ID easily. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Nonzero if the systray icon has been successfully added, zero otherwise. 

</blockquote><p><b>Remarks</b></p><blockquote>

All SysTray icons are automatically removed when the program ends. 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="removesystrayicon.html">RemoveSysTrayIcon()</a>, <a href="changesystrayicon.html">ChangeSysTrayIcon()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><a href=index.html>SysTray Index</a> - <a href=changesystrayicon.html>ChangeSysTrayIcon()</a> ->

</body></html>